<!--
 * @Description: 
 * @Author: charles
 * @Date: 2021-08-19 09:38:19
 * @LastEditors: charles
 * @LastEditTime: 2021-08-19 09:42:20
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>媒体查询</title>
  <style>
    body {margin: 0;}

    .container {
      background-color: lightblue;
      height: 100px;
    }
    /* 屏幕 900px ~ 1200px */
    @media screen and (min-width:900px) and (max-width:1200px) {
      .container {
        background-color: pink;
      }
    }
    /* 屏幕 > 1200px */
    @media screen and (min-width:1200px) {
      .container {
        background-color: teal;
      }
    }
  </style>
</head>
<body>
  <div class="container">

  </div>
</body>
</html>